package com.hxminer.hxwebs.dao;

import com.hxminer.hxwebs.model.User;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author YRG
 * Created by on 2018/5/9.
 * Describe
 */
@Transactional
@Repository
public interface UserDao extends PagingAndSortingRepository<User, String> {


    List<User> findByUsernameAndPassword(String username, String password);

    List<User> findByUsername(String username);

    //    List<User> findUsersBy(String phoneOrMail);
    List<User> findByPhonemail(String phonemail);

//    List<User> findByUsernameOrPhonemailAndPassword(String str,String password);
//    List<User> findByUsernameOrPhoneOrMail(String username, String phoneOrMail);

}
